#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：back 
@File    ：user_proto.py
@IDE     ：PyCharm 
@Author  ：七分是你
@Date    ：2024/6/28 下午5:35 
@explain : 
"""
from pydantic import BaseModel


# xlx_member
class MemberCodeLoginRequest(BaseModel):
    mobile: str
    code: str
    utype: int


class MemberLoginRequest(BaseModel):
    mobile: str
    utype: int


class MemberInfoResponse(BaseModel):
    uid: int
    utype: int
    mobile: str


class MemberInfo(BaseModel):
    uid: int = 0
    utype: int = 0
    mobile: str = ''
    username: str = ''
    email: str = ''
    reg_time: str = '0'
    reg_ip: str = ''
    reg_address: str = ''
    last_login_time: str = ''
    last_login_ip: str = ''
    last_login_address: str = ''
    status: int = 1
    avatar: str = ''
    robot: int = 0
    platform: str = ''
    nologin_notice_counter: int = 0
    disable_im: int = 0
    points: int = 0
    coupon: int = 0
    order_quantity: int = 0


class MemberDetailProto(BaseModel):
    uid: int
    utype: int = 1
    mobile: str
    username: str = ''
    email: str
    password: str = ''
    pwd_hash: str
    reg_time: int
    reg_ip: str
    reg_address: str
    last_login_time: int
    last_login_ip: str
    last_login_address: str
    status: int = 1
    avatar: str
    robot: int = 0
    platform: str = ''
    nologin_notice_counter: int = 0
    disable_im: int = 0
    openid: str = ''
